<template>
  <header class="home-header">
    <div class="home-header-search" @click="search">
      <van-search
        shape="round"
        background="#ff7c0d"
        placeholder="输入商品名或粘贴宝贝标题搜索"
      />
    </div>
    <div class="home-header-msg" @click="msg">
      <van-icon name="chat-o" color="#fff" />
      <span>消息</span>
    </div>
  </header>
</template>
<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  setup() {
    const search = () => {
      window.location.href = "/search";
      console.log(1);
    };
    const msg = () => {
      window.location.href = "/msg";
    };
    return {
      search,
      msg,
    };
  },
});
</script>
<style lang="stylus" scoped>
.home-header
    display flex
    position relative
    z-index 2
    justify-content space-between
    .home-header-search
        flex 1
    .home-header-msg
        width .44rem
        height .44rem
        display flex
        justify-content center
        flex-wrap wrap
        justify-items center
        box-sizing border-box
        padding-top .08rem
        color #fff
        font-size .12rem
        i
            font-size .25rem
</style>
